<%-- 
    Document   : booking
    Created on : 02.08.2009, 20:44:19
    Author     : Mario
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="../STYLES/serverStyles.css" />
        <title>FBIS - ADMIN / BUCHUNG</title>
        <script>
            function repl() {
                var tmp = document.book.val.value;
                tmp = tmp.replace((/,/g),".");
                document.book.val.value = tmp;
            }
        </script>
    </head>
    <body>
        <jsp:useBean id="consumers" scope="application" class="de.stalinski.db.ConsumersConnector" />
        <%
        String fn = "";
        String sn = "";
        String un = "";
        String id = request.getParameter("id");


        if (!id.equals("0")) {
            fn = request.getParameter("fn");
            sn = request.getParameter("sn");
            un = request.getParameter("un");
        }
        %>

        <div id="container">
            <div id="header">
                <jsp:include page="../HTML/header.html"/>
            </div>
            <div id="leftBar">
                <form name="frm" action="" method="GET">
                    <div class="leftMenu">
                        <table>
                            <tbody>
                                <tr>
                                    <td><a class="button" href="../menu.jsp"><span>Zurück</span></a></td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </form>
            </div>
            <div id="content">
                <div class="scroll">
                    <form name="book" action="doBook.jsp" method="GET">
                        <table class="Prices" cellspacing="0">
                            <tbody>
                                <tr>
                                    <td>Buchung für:</td>
                                    <td><%
        if (id.equals("0")) {
            out.print(consumers.getUserDropDown(false));
        } else {
            out.print("<input type=\"text\" name=\"consumer\" value=\"" + sn + ", " + fn + "\"/>");
        }

                                    %></td>
                                </tr>
                                <tr>
                                    <td>Betrag:</td>
                                    <td><input type="text" name="val" onkeyup="repl()" onblur="repl()"/></td>
                                </tr>
                                <tr>
                                    <td colspan="2"><input type="submit" value="Buchen"/>
                                    <input type="reset" value="Reset" /></td>
                                </tr>
                            </tbody>
                        </table>

                    </form>
                </div>
            </div>

            <div id="footer" >
                <jsp:include page="../HTML/footer.html"/>
            </div>
        </div>
    </body>
</html>
